<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean"  prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html"  prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"   prefix="c" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Ofertas para el Cliente - Registro de Reevaluación de Ingresos</title>
	<link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/css/ui.jqgrid.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/css/redmond/jquery-ui-1.8.2.custom.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/css/operhc_style.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/css/buttonOHC.css" />
	
	<script type="text/javascript" src='<%= request.getContextPath()%>/dwr/interface/ConsultaActualAction.js'></script>
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/engine.js'></script>
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/util.js'></script>
	<script src="<%=request.getContextPath()%>/js/util/gridUtil.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/jquery-1.7.1.js" type="text/javascript"></script>	
	<script src="<%=request.getContextPath()%>/js/i18n/grid.locale-es.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/jquery.jqGrid.src.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/grid.subgrid.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/util/encabezado.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/util/formatters.js" type="text/javascript"></script>
	
<script type="text/javascript" charset="UTF-8">

function evaluateNewIncomes(){	
	ConsultaActualAction.procesarReevaluacionIngresoAjax(function(data){
		if(data != null){
			if(data.messageError != undefined) {
				alert(data.messageError);
			} else {
				if(data.mensajeExito != undefined) {
					alert(data.mensajeExito);
				}
			}
		}
		
		var frameConsultaActual = window.opener.top.document.getElementsByName("frameConsultaActual")[0];
		var contentFrame = (frameConsultaActual.contentWindow || frameConsultaActual.contentDocument);
		contentFrame.showBodyForm();
		window.close();
	});	
}

</script>
</head>
<body>
<html:form styleId="formContrato" method="post" action="consultaActualForm.do?method=procesarReevaluacionIngresoAjax">
<br/>
<table border="0" cellspacing="0" cellpadding="0">
	
	<tr>
	<td>&nbsp;Ingreso Fijo:</td>
	<td align="left">&nbsp;<input type="text" readonly="readonly" name="ingresoFijo" id="ingresoFijo" value="<c:out value="${command.ingresoFijo}"/>" style="width: 150px; text-align: right;"/></td>
	</tr>
	
	<tr>
	<td>&nbsp;Ingreso Variable:</td>
	<td align="left">&nbsp;<input type="text" readonly="readonly" name="ingresoVariable" id="ingresoVariable" value="<c:out value="${command.ingresoVariable}"/>" style="width: 150px; text-align: right;"/></td>
	</tr>
	
	<tr>
	<td>&nbsp;</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;
	<%--
	<a href="javascript:evaluateNewIncomes();"><img src="imagenes/btevaluar-1.jpg" border="0"></a>
	 --%>
	 
	<a href="javascript:evaluateNewIncomes();" class="buttonOHC">EVALUAR</a>
	</td>
	</tr>
</table>

</html:form>
</body>
<script type="text/javascript" charset="UTF-8">

$("#ingresoFijo").val(formatMoney($("#ingresoFijo").val(), 2, ",", ".", ""));
$("#ingresoVariable").val(formatMoney($("#ingresoFijo").val(), 2, ",", ".", ""));

</script>
</html>